package com.zzyl.controller;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.service.AlertDataService;
import com.zzyl.vo.AlertDataVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description AlerDataController
 * @Author WangHao
 * @Date 2025-09-16
 */
@RestController
@RequestMapping("/alert-data")
public class AlertDataController {

    @Autowired
    private AlertDataService alertDataService;

    @GetMapping("/pageQuery")
    public ResponseResult<PageResponse<AlertDataVo>> getByPage(Integer pageNum,
                                                               Integer pageSize,
                                                               String deviceName,
                                                               Integer endTime,
                                                               Integer id,
                                                               Integer startTime,
                                                               Integer status
                                                               ){
        PageResponse<AlertDataVo> pageResponse = alertDataService.getByPage(pageNum,pageSize,deviceName,endTime,id,startTime,status);
        return ResponseResult.success(pageResponse);
    }


}
